From: Mike Hommey Date: Tue, 19 Aug 2025 05:08:34 +0000 (+0000) Subject: Bug 1983713 - Use non-deprecated ast value. r=firefox-build-system-reviewers,nalexand... X-Git-Tag: archive/raspbian/140.14.0esr-2+rpi1^2~23 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=280d13c03103f374d7fa8bd6b7664989ed2fa2ab;p=firefox-esr.git Bug 1983713 - Use non-deprecated ast value. r=firefox-build-system-reviewers,nalexander,ahochheiden ast.Str was deprecated in python 3.12 and removed in 3.14. It inherited from ast.Constant, `Str.s` was equivalent to `Constant.value`, so we can use the latter on both old and newer python versions. Differential Revision: https://phabricator.services.mozilla.com/D261511 Gbp-Pq: Topic fixes Gbp-Pq: Name Bug-1983713-Use-non-deprecated-ast-value.-r-firefox-.patch --- diff --git a/python/mach/mach/command_util.py b/python/mach/mach/command_util.py index 44e13f18d6c..8539bf37b5b 100644 --- a/python/mach/mach/command_util.py +++ b/python/mach/mach/command_util.py @@ -292,7 +292,7 @@ class DecoratorVisitor(ast.NodeVisitor): kwarg_dict = {} for name, arg in zip(["command", "subcommand"], decorator.args): - kwarg_dict[name] = arg.s + kwarg_dict[name] = arg.value for keyword in decorator.keywords: if keyword.arg not in relevant_kwargs: